// The Vue build version to load with the `import` command
// (runtime-only or standalone) has been set in webpack.base.conf with an alias.
import Vue from 'vue'
import App from './App'
import router from './router'
import Vuex from 'vuex'
import store from './store/store'
import ElementUI from 'element-ui'
import 'element-ui/lib/theme-chalk/index.css'
import locale from 'element-ui/lib/locale/lang/en'
import VueI18n from 'vue-i18n'
import resetCss from '../static/css/reset.css'
import './assets/css/common.css'
import '@/assets/css/qxz_overwrite.css'
import zh from './assets/js/zh.js'
import en from './assets/js/en.js'
import zhTw from './assets/js/zh-tw.js'
import _ from 'lodash'
import http from './tool/http'
import './utils/setFontSize'
// 格式化时间
import './utils/formateDate'
import './utils/pub_sub.js'
import initInterface from './utils/initInterface'
import echarts from 'echarts'

Vue.prototype.$echarts = echarts
Vue.config.productionTip = false
Vue.prototype._ = _;
Vue.prototype.$ajax = http;
Vue.prototype.$echarts = echarts;
// Vue.prototype.apiTest = 'http://192.168.24.167:7000';
// Vue.prototype.apiTest = 'http://192.168.28.240:7000';
Vue.prototype.apiTest = 'http://elove.dr.com:7000';
// Vue.prototype.apiCrm = 'http://192.168.14.136:8050';
Vue.prototype.apiCrm = 'http://elove.dr.com:7000';
Vue.prototype.apiIntegra = 'http://192.168.24.131:8050';
Vue.prototype.apiUpload = 'http://192.168.14.136:8010';
/* eslint-disable no-new */
Vue.use(ElementUI)
Vue.use(VueI18n)
Vue.use(Vuex)
const i18n = new VueI18n({
  locale: 'zh',
  messages: {
    'zh': zh,
    'en': en,
    'zhTw': zhTw
  },
  silentTranslationWarn: true
})

// Create a Vue instance with `i18n` option
// new Vue({ i18n }).$mount('.hello')
async function init () {
  initInterface();
  new Vue({
    el: '#app',
    router,
    i18n,
    store,
    components: { App },
    template: '<App/>'
  })
}
init();